#ifndef _WEAPON_H_
#define _WEAPON_H_

#include <cocos2d.h>

class Bullet;
class BaseObject;

USING_NS_CC;

class Plant;

class Weapon : public CCNode
{
public:
	Weapon();
	~Weapon(void);

	virtual CCArray* addBullet();
	virtual void removeBullet(Bullet* bullet);
	virtual void processsing(float dt);
	virtual bool init();
	virtual void onEnter();
	virtual void onExit();

	/* Owner of weapon */
	virtual BaseObject* getOwner();
	CC_SYNTHESIZE_RETAIN(CCString*, _id, Id);
	CC_SYNTHESIZE_RETAIN(CCArray*, _listBulletsData, BulletData);
	CC_SYNTHESIZE_RETAIN(CCDictionary*, _extraData, ExtraData);
	CC_SYNTHESIZE(float, _timeDelay, TimeDelay);
	CREATE_FUNC(Weapon);
};

#endif // !1
